{extend name="base" /}
{block name="header_top"}
    {include file="header-top" /}
    {include file="header-nav" /}
{/block}
{block name="body"}

<div class="width-out clearfix" id="columnConBox">
    <div class="tree-container">
        <div class="category-list">
            <ul>
                <li class="d-flex align-items-start noMoreSceen">
                    <p class="btn">顶级分类</p>
                    <span class="mr-3 ml-1 btn">：</span>
                    <div>
                        <a class="btn btn-default " href="javascript:;">全部</a>
                        {foreach $all_top_category as $item}
                        <a class="btn btn-default {eq name="$top_id" value="$item.id"}searchActive{/eq}" href="{:url(sprintf("/c-%d",$item['id']))}">{$item.name}</a>
                        {/foreach}
                    </div>
                </li>
                <li class="d-flex align-items-start noMoreSceen">
                    <p class="btn">子分类</p>
                    <span class="mr-3 ml-1 btn">：</span>
                    <div>
                        <a class="btn btn-default {eq name="$sub_id" value="0"}searchActive{/eq}" href="javascript:;">全部</a>
                        {foreach $all_sub_category as $item}
                        <a class="btn btn-default {eq name="$sub_id" value="$item.id"}searchActive{/eq}" href="{:url(sprintf("/c-%d-%d",$top_id,$item['id']))}">{$item.name}</a>
                        {/foreach}
                    </div>
                </li>
            </ul>
        </div>
        <div class="category-container">
            <nav class="navbar navbar-expand-lg navbar-light border-bottom">
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>

                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                    <ul class="navbar-nav mr-auto font-14">
                        <li class="nav-item active" data-update="1" data-hot="0">
                            <a class="nav-link">最新上传 <span class="sr-only">(current)</span></a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link disabled" href="javascript:;" tabindex="-1" aria-disabled="true">共<span class="text-danger" id="relativeNum">{$total}</span>个资源</a>
                        </li>
                    </ul>
<!--                    <div class="form-inline my-2 my-lg-0">-->
<!--                        <input class="form-control mr-sm-2" type="search" placeholder="在结果中搜索" aria-label="Search" id="resultSearchInput">-->
<!--                        <button class="btn btn-outline-primary my-2 my-sm-0" type="button" data-target="#resultSearchInput" id="resultSearchBtn">-->
<!--                            <i class="iconfont">&#xe672;</i>-->
<!--                        </button>-->
<!--                    </div>-->
                </div>
            </nav>
            <div class="category-list-items empty-box-2">

                <ul>
                    {foreach $article_list as $item}
                    <li class="d-flex border-bottom">
                        <div class="flex-shrink-0 mr-3 items-img">
                            <div class="img-box">
                                <img src="{$item | showThumbnail}" alt="{$item.title}">
                            </div>
                        </div>
                        <div class="flex-grow-1">
                            <div class="d-flex align-items-center">
                                <a class="text-dark flex-grow-1 title" target="_blank" title="{$item.title}" href="{:url('/zy-' . $item['id'])}">
                                    <h5 class="text-ellipsis font-weight-bold width-100">{$item.title}</h5>
                                </a>
                            </div>

                            <div class="font-14 sign mt-3">
                                {$item.tags | showTags | raw}
                            </div>
                            <div class="d-flex font-14 text-secondary mt-3 items-info">
                                <p class="mr-4 pr-3 mb-0">ID：{$item.id}</p>
                                <p class="mr-4 pr-3 mb-0">大小：{$item.size | formatSize}</p>
                                <p class="mr-4 pr-3 mb-0">类型：{$item.ext}</p>
                                <p class="mr-4 pr-3 mb-0">更新时间：{$item.create_time | date='Y-m-d'}</p>
                            </div>
                        </div>
                        <div class="flex-shrink-0 ml-4 text-center d-flex align-items-center column-features">
                            <div>
                                <a class="btn btn-primary d-block font-14" href="{:url('/zy-' . $item['id'])}">查看全文</a>
                            </div>
                        </div>
                    </li>
                    {/foreach}
                </ul>
            </div>
            <div class="py-4 text-center page-list">

            </div>
            <div class="py-4 text-center">
                <?php echo $pages;?>
<!--                <div class="py-4 text-center page-list" data-total="8"><button class="btn btn-light disabled" tabindex="-1" role="button" aria-disabled="true" data-page="1" disabled="">首页</button>-->
<!--                    <button class="btn btn-light disabled" tabindex="-1" role="button" aria-disabled="true" data-page="2" disabled="">上一页</button>-->
<!--                    <button class="btn btn-primary" tabindex="-1" role="button" aria-disabled="true" data-page="1">1</button>-->
<!--                    <button class="btn btn-light" data-page="2">2</button>-->
<!--                    <button class="btn btn-light" data-page="3">3</button>-->
<!--                    <button class="btn btn-light" data-page="4">4</button>-->
<!--                    <button class="btn btn-light" data-page="5">5</button>-->
<!--                    <button class="btn btn-light" data-page="6">6</button>-->
<!--                    <button class="btn btn-light" data-page="7">7</button>-->
<!--                    <button class="btn btn-light" data-page="8">8</button>-->
<!--                    <button class="btn btn-light" data-page="2">下一页</button>-->
<!--                    <button class="btn btn-light" data-page="8">末页</button>-->
<!--                </div>-->
            </div>
        </div>
    </div>
</div>
{/block}